﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using TyMES.Model;

namespace TyMES.Model.BaseInformation
{
    /// <summary>
    /// 产线数据模板
    /// </summary>
	[Table("LMESProductDataTemplates")]
    [SoftKey(nameof(LMESProductDataTemplate.TemplateCode))]
    [Display(Name = "_Model.LMESProductDataTemplate")]
    public class LMESProductDataTemplate : TopBasePoco,IPersistPoco
    {
        [Display(Name = "_Model._LMESProductDataTemplate._dataStatus")]
        [Comment("数据状态")]
        public string DataStatus { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._enableStatus")]
        [Comment("启用状态")]
        public string EnableStatus { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._equCode")]
        [Comment("设备编码")]
        public string EquCode { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._equName")]
        [Comment("设备名称")]
        public string EquName { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._factoryCode")]
        [Comment("工厂编码")]
        public string FactoryCode { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._operationCode")]
        [Comment("工序编码")]
        public string OperationCode { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._operationName")]
        [Comment("工序名称")]
        public string OperationName { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramCode")]
        [Comment("设备数采参数编号")]
        public string ParamCode { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramCodeKey")]
        [Comment("参数编码key")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string ParamCodeKey { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramName")]
        [Comment("设备数采参数名称")]
        public string ParamName { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramNameKey")]
        [Comment("参数名称key")]
        public string ParamNameKey { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramRange1")]
        [Comment("上限值")]
        public string ParamRange1 { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramRange2")]
        [Comment("下限值")]
        public string ParamRange2 { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramUnit")]
        [Comment("参数单位")]
        public string ParamUnit { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._paramValueKey")]
        [Comment("参数值的key")]
        public string ParamValueKey { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._sort")]
        [Comment("排序编码")]
        public int? Sort { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._actualsort")]
        [Comment("实际编码顺序")]
        public int? Actualsort { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._standardValue")]
        [Comment("标准值")]
        public string StandardValue { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._stationCode")]
        [Comment("工位编码")]
        public string StationCode { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._templateCode")]
        [Comment("模板编码")]
        [Required(ErrorMessage = "Validate.{0}required")]
        [CanNotEdit]
        public string TemplateCode { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._uniqueCode")]
        [Comment("设备唯一编号")]
        public string UniqueCode { get; set; }
        [Display(Name = "_Model._LMESProductDataTemplate._IsValid")]
        [Comment("是否有效")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public bool IsValid { get; set; } = true;

	}

}
